package com.qcby.examplespringbootconsumer;


import com.qcby.examplecommon.model.User;
import com.qcby.examplecommon.service.UserService;
import com.qcby.rpcspringbootstarter.annotation.RpcReference;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ExampleServiceImpl {

    /**
     * 使用 Rpc 框架注入
     */
    @RpcReference
    UserService userService;

    /**
     * 测试方法
     */
    public void test() {
        User user = new User();
        user.setName("yue");
        User resultUser = userService.getUser(user);
        System.out.println(resultUser.getName());
    }

}